﻿@model IOrderedEnumerable<Project.Domain.Entities.Match>
<table>
    
    <tr>
        <th>
            Home team
        </th>
        <th>
            Away team
        </th>
        <th>
            League
        </th>
        <th>
            StartTime
        </th>
        <th>
            Status
        </th>
        <th>
            Action
        </th>
    </tr>
    @foreach (var match in Model)
    {
        <tr>
            <td>
                @match.SoccerTeam_Home.TeamName
            </td>
            <td>
                @match.SoccerTeam_Away.TeamName
            </td>
            <td>
                @match.League.NameLeague
            </td>
             <td>
                @string.Format("{0:dd/MM/yyyy hh:mm}", match.StartTime)
            </td>
            <td>
                @match.Status
            </td>
            <td>
                @Html.ActionLink("Sửa", "Editmatch", new { controller = "Managebets", id = match.MatchID })|
                @Html.ActionLink("Xóa", "Deletematch", new { controller = "Managebets", id = match.MatchID })   |             
                @(match.Status == false ? Html.ActionLink("trận đấu bắt đầu ", "Startmatch", new {controller = "Managebets", id = match.MatchID}) : Html.ActionLink("kết thúc trận đấu  ", "endmatch", new {controller = "Managebets", id = match.MatchID}))
            </td>
        </tr>
    }
    
</table>
